package com.matt.repository.impl;

import com.matt.domain.nursery.NurserySchedule;
import com.matt.foundation.constant.ClassesConstant;
import com.matt.foundation.utils.DateUtil;
import com.matt.foundation.vo.nursery.InstructionRecordVo;
import com.matt.foundation.vo.nursery.NurseryClassesShortVo;
import com.matt.foundation.vo.nursery.NurseryClassesVo;
import com.matt.foundation.vo.nursery.NurseryScheduleVo;
import com.matt.repository.base.BaseNativeSqlRepository;
import com.matt.repository.base.NurseryScheduleNativeRepository;
import com.matt.repository.nursery.InstrationRecordRepository;

import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * *******************************
 * Created by lch.
 * form com.matt
 * on 2018/11/26
 * *******************************
 */
@Service
public class NurseryInstractionRepositoryImpl extends BaseNativeSqlRepository implements InstrationRecordRepository {
	@Override
	public List<Object[]> findInstructionRecordVoByMonthAndDay(Integer Month, Integer Day) {
		 String querySql = String.format("select a.Order_Money as orderMoney,a.From_Time as fromTime,a.To_Time as toTime,a.Month as month,a.Day as day,b.Title as title,b.Media as media "
	        		+ "from m_baby_defaulthandbook a "
	        		+ "left join m_test_store b on a.TestStore_ID=b.ID "
	        		+ "where a.Month='%s' and a.Day='%s' and a.Order_Money=15888 and a.Is_Deleted = 0 and b.Title is not null "
	        		+ "group by a.From_Time order by a.From_Time asc",Month,Day);
		  List<Object[]> objectArrayList = sqlArrayList(querySql);
		  
		  return objectArrayList;
	}

}
